
<form method="post">
    <div class="row-fluid">
        <textarea id="rule" class="col-xs-12" style="height: 500px;"><{$rule}></textarea>
    </div>
    <div class="row-fluid">
        <input class="col-xs-2" type="submit" value="保存">
    </div>
</form>

<script>
    $(function () {
        $('form').submit(function () {
            var url = "<{url r='admin/setUrlRule'}>";
            $.post(url, {rule:$('#rule').val()}, function (j) {
                alert(j.msg);
            }, 'json');
            return false;
        });
    });
</script>